package data.nanjing.expo.services;

import data.nanjing.expo.models.dao.TradeBidInfoDao;
import data.nanjing.expo.models.dao.TradeRequireDao;
import data.nanjing.expo.models.domain.TradeBidInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created by zjp on 2018/6/29.
 * QQ：34948062
 * github: https://www.github.com/zjp1029
 * web： http://www.zjp1029.cn
 */
@Service
public class TradeBidInfoService {

    @Autowired
    private TradeBidInfoDao tradeBidInfoDao;

    @Autowired
    private TradeRequireDao tradeRequireDao;

    //添加投标信息
    @Transactional
    public void addBidInfo(TradeBidInfo tradeBidInfo) {
        tradeBidInfoDao.addBidInfo(tradeBidInfo);
        tradeRequireDao.addBidNumber(tradeBidInfo.getRequireId());
    }

}
